package com.lch.designpattern.singleton.lazy;

/**
 * 懒汉式单例模式
 *
 * @author: liuchenhui
 * @create: 2019-04-15 09:33
 **/
public class LazySingleton {

    private static LazySingleton lazySingleton = null;

    private LazySingleton() {
    }

    public static synchronized LazySingleton getInstance() {

        if (lazySingleton == null) {
            lazySingleton = new LazySingleton();
        }
        return lazySingleton;
    }
}
